<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js字符串和数组对象</title>
</head>
<body>
	
</body>

<script>
	//方法2：用点分隔 数组长度-1
	str='index.inc.class.php';
	arr=str.split('.');  
	l=arr.length;

	alert(arr[l-1]); //

</script>
</html>